package br.com.caelum.vraptor.controller;

import javax.inject.Inject;

import br.com.caelum.vraptor.Controller;
import br.com.caelum.vraptor.Result;
import br.com.caelum.vraptor.dao.GenericDAO;
import br.com.caelum.vraptor.entidades.Administrador;

@Controller
public class AdministradorController {
	@Inject
	private Result result;
	@Inject
private GenericDAO<Administrador> dao;
	
	public void add(){
		
	}
	
	public List<Admnistrador> list(){
		return dao.find();
	}
	
	public void save(Admnistrador administrador){
		dao.save(administrador);
		result.redirectTo(this).list();
	}

	
}
